<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>管理密码修改</title>
	<meta name="decorator" content="default"/>
	<style type="text/css">
		#inputForm{
			width:80%;
			margin:auto;
		}
	</style>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#oldPw").focus();
			$("#inputForm").validate({
				rules:{
	                "newPw2": {
		            	ifEqual: "#newPw1"
	                }
		        },
				submitHandler: function(form){
					bossLoginSubmit('${fns:getStore().bossPassword}', form, '', '');
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
	<div data-role="navbar">
	    <ul>
	        <li><a href="${ctx}/sys/setting/loginPwForm">任务密码修改</a></li>
	        <li><a href="${ctx}/sys/setting/bossPwForm" class="ui-btn-active">管理密码修改</a></li>
	    </ul>
	</div>
	<div class="icon-buttons">
		<input type="button" class="leave-clean-session" data-inline="true" data-icon="back" data-iconpos="notext" value="返回"/>
	</div>
	<form:form id="inputForm" modelAttribute="dict" action="${ctx}/sys/setting/changeBossPW" method="post" class="form-horizontal">
		<tags:message content="${message}"/>
		<div data-role="fieldcontain">
			<label for="oldPw">管理密码:</label>
			<input type="password" name="oldPw" id="oldPw" class="required"/>
		</div>
		<div data-role="fieldcontain">
			<label for="newPw1">新密码:</label>
			<input type="password" name="newPw1" id="newPw1" class="required"/>
		</div>
		<div data-role="fieldcontain">
			<label for="newPw2">重复密码:</label>
			<input type="password" name="newPw2" id="newPw2" class="required"/>
		</div>
		<input  type="submit" value="修 改"/>
	</form:form>
</body>
</html>
